<?php /* Smarty version Smarty-3.1.6, created on 2012-12-01 13:22:36
         compiled from "./admin/Tpl\class\index.html" */ ?>
<?php /*%%SmartyHeaderCode:663450b2412363bba8-70766935%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'daae80364d7d77817d8242e8a5e4d843a2d7df40' => 
    array (
      0 => './admin/Tpl\\class\\index.html',
      1 => 1354339337,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '663450b2412363bba8-70766935',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_50b2412378f10',
  'variables' => 
  array (
    'lists' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_50b2412378f10')) {function content_50b2412378f10($_smarty_tpl) {?><link href="/assets/css/admin.css" rel="stylesheet" type="text/css"/>
<link href="/assets/css/dialog.css" rel="stylesheet" type="text/css" />
<body>
<div class="pad-10">
<form id="form1" action="?m=class&a=index" method="post">
<div class="table-list">
      <table width="100%" cellspacing="0">
        <thead>
          <tr class="first_tr">
            <th width="40">序号</th>
            <th width="15"><input type="checkbox" value="" id="check_box" onclick="checkAll();"></th>
            <th width="40">ID</th>
            <th>分类名称</th>
            <th width="30">排序</th>
            <th width="30">首页</th>
            <th width="30">审核</th>
            <th width="30">操作</th>
          </tr>
        </thead>
        <tbody>
		<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['item'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['item']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['lists']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['name'] = 'item';
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['item']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['item']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['item']['total']);
?>
          <tr>
            <td align="center"><a href="/index.php?a=product&id=<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
</a></td>
            <td align="center"><input data-id="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
" class="check yiji" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
" name="id[]"></td>
            <td align="center"><a class="blue" href="index.php?a=index&amp;m=item&amp;id=106" target="_blank"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
</a></td>
            <td align="center"><a href="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['item_link'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['className'];?>
</a></td>
            
            <td align="center"><input type="text" class="input-text-c input-text" size="4" value="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['sort'];?>
" name="sort" id="listorders[106]" ></td>
            <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
,'is_index')" id="is_index_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['is_index'];?>
.gif"></td>
            <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
,'status')" id="status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['status'];?>
.gif"></td>
            <td align="center"><a class="blue" href="/admin.php?m=class&a=edit&id=<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
">编辑</a></td>
          </tr>
		   <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['son'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['son']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['name'] = 'son';
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['son']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['son']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['son']['total']);
?>
			 <tr>
            <td align="center"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
</td>
            <td align="center"><input class="check erji<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['id'];?>
" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
" name="id[]"></td>
            <td align="center"><a class="blue" href="index.php?a=index&amp;m=item&amp;id=106" target="_blank"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
</a></td>
            
            <td align="center"><a style="margin-left:30px;" href="{$item.item_link}" target="_blank"><?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['className'];?>
</a></td>
            
            <td align="center"><input type="text" class="input-text-c input-text" size="4" name="sort" value="<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['sort'];?>
" id="listorders[106]" ></td>
            <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
,'is_index')" id="is_index_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['is_index'];?>
.gif"></td>
            <td align="center" onclick="status(<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
,'status')" id="status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
"><img src="/assets/images/status_<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['status'];?>
.gif"></td>
            <td align="center"><a class="blue" href="/admin.php?m=class&a=edit&id=<?php echo $_smarty_tpl->tpl_vars['lists']->value[$_smarty_tpl->getVariable('smarty')->value['section']['item']['index']]['children'][$_smarty_tpl->getVariable('smarty')->value['section']['son']['index']]['id'];?>
">编辑</a></td>
			</tr>
			<?php endfor; endif; ?>
		  <?php endfor; endif; ?>
        </tbody>
      </table>
      <div class="btn">
        <label for="check_box" style="float:left;">全选/取消</label>
        <input type="submit" onclick="del()" class="button" name="dosubmit" value="删除" style="float:left;margin:0 10px 0 10px;">
        <input type="submit" class="button" name="dosubmit" value="排序">
        <input type="submit" class="button" name="dosubmit" value="更新">
        <div id="pages">
			<?php echo $_smarty_tpl->tpl_vars['page']->value;?>

		</div>
      </div>
    </div>
</form>
</div>
</body>
<script src="/assets/js/jquery.js"></script>
<script>
function checkAll(){
	
	$(".check").attr("checked",$("#check_box").attr("checked"));
}
function del(){
	if(confirm('你确定要删除吗？')){
		$("#form1").attr("action","?m=class&a=del");
	}else{
		return;
	}
}
function status(id,type){
    $.get("/admin.php?a=status&m=class", { id: id, type: type }, function(jsondata){
		//alert(jsondata);
		$("#"+type+"_"+id+" img").attr('src', '/assets/images/status_'+jsondata+'.gif')
	}); 
}

$(".yiji").click(function(){
	//alert($)
	$(".erji"+$(this).attr("data-id")).attr("checked",$(this).attr("checked"));
});
</script>
<?php }} ?>